﻿using DeltaEngine.Content;
using DeltaEngine.Scenes;
using DeltaEngine.Platforms.All;
using DeltaEngine.Platforms.Tests;
using DeltaEngine.Rendering.ScreenSpaces;
using NUnit.Framework;
using System;
using DeltaEngine.Platforms;
using DeltaEngine.Input;

namespace DeltaNinja.Tests.Pages
{
	internal class HomeTests : TestWithAllFrameworks
	{
		[VisualTest]
		public void CreateHome(Type resolver)
		{
			Start(resolver, (ContentLoader content, Window window, ScreenSpace screen, InputCommands input) =>
			{
				var home = new HomePage(content, screen, input);
				home.Show();

				home.ButtonClicked += (x) => { window.Title = "Clicked: " + x.ToString(); };

				if (DeltaEngine.Entities.EntitySystem.HasCurrent)
					Assert.IsTrue(DeltaEngine.Entities.EntitySystem.Current.NumberOfEntities == 5);
				else
					Assert.NotNull(home);
			});
		}
	}
}
